package com.bjpowernode.springboot.web.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.bjpowernode.springboot.domain.Student;
import com.bjpowernode.springboot.service.StudentService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * CreateTime：2020/9/2 17:34
 */

@RestController
@RequestMapping("/student")
public class StudentController {

    @Reference(interfaceClass = StudentService.class, version = "1.0.0", timeout = 5000, check = false)
    private StudentService studentService;

    @RequestMapping("/getStudentList")
    public List<Student> getStudentList() {
        List<Student> studentList = studentService.getStudentList();
        return studentList;
    }
}
